package com.zlcx.tz.live.enums;

/**
 * @AUTHOR xhl
 * @CREATE 2019-04-18 15:59
 **/
public enum RoomPublisherMaxNum {
    TWO_PERSON( "2人", 2),
    THREE_PERSON( "3人", 3),
    FOUR_PERSON( "4人", 4);

    RoomPublisherMaxNum( String tips, int number) {
        this.tips = tips;
        this.number = number;
    }

    private String tips;
    private int number;

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getTips() {
        return tips;
    }

    public void setTips(String tips) {
        this.tips = tips;
    }

    public static RoomPublisherMaxNum getRoomPublisherMaxNum(int code) {
        for (RoomPublisherMaxNum field : RoomPublisherMaxNum.values()) {
            if (code == field.getNumber()) {
                return field;
            }
        }
        return null;
    }
}
